package pl.umk.mat.fred.unicore.urc.storagemanagement.actions;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.viewers.IStructuredSelection;

import pl.umk.mat.fred.unicore.urc.storagemanagement.views.StorageBrowserView;

public class CopyAction extends Action {

	private StorageBrowserView view;
	
	public CopyAction(StorageBrowserView view) {
		this.view = view;
		this.setText("Copy");
	}
	
	public void run() {
		final IStructuredSelection selection = (IStructuredSelection) view.getTreeViewer().getSelection();
		view.setClipboard(selection);
	}
}
